package com.zmc.lostfound.post.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zmc.lostfound.common.utils.Result;
import com.zmc.lostfound.post.entity.PostEntity;
import com.zmc.lostfound.post.vo.post.PostCompleteVO;
import com.zmc.lostfound.post.vo.post.PostDetailInfoVO;
import com.zmc.lostfound.post.vo.post.PostSaveVO;

/**
 * @author ZMC
 * @description 帖子管理业务接口
 * @email 2869581855@qq.com
 * @date 2023-07-05 15:49:44
 */
public interface PostService extends IService<PostEntity> {

    /**
     * 按帖子id查询帖子详细信息
     *
     * @param postId 帖子id
     * @return PostDetailInfoDTO
     */
    PostDetailInfoVO queryDetailInfoByPostId(Long postId);

    /**
     * 用户发布帖子
     *
     * @param postSaveVO 用户发布/修改帖子信息请求体
     * @return Result
     */
    Result publish(PostSaveVO postSaveVO);

    /**
     * 用户修改帖子信息
     *
     * @param postSaveVO 用户发布/修改帖子信息请求体
     * @return Result
     */
    Result updatePost(PostSaveVO postSaveVO);

    /**
     * 用户完成帖子
     *
     * @param postCompleteVO 用户完成帖子请求体
     * @return Result
     */
    Result complete(PostCompleteVO postCompleteVO);

    /**
     * 按帖子id删除帖子
     *
     * @param postId 帖子id
     * @return Result
     */
    Result deleteByPostId(Long postId);

}

